import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
class ArrayListConvert {
	public static void main(String[] args) {
		Integer[] ints={100,20,30,40,50,60};
		ArrayList<Integer> list=new ArrayList<>(Arrays.asList(ints));

		Collections.sort(list);
		System.out.println(list);

		Collections.shuffle(list);
		System.out.println(Collections.max(list));
		System.out.println(Collections.min(list));
		System.out.println(list);

		Integer[] ints2=new Integer[list.size()];
		list.toArray(ints2);
		for(int i=0;i<ints2.length;i++) {
			System.out.print(ints[i] + " ");
		}
		System.out.println();

	}
}
